const Sequelize = require('sequelize');

import sequelize from './db/sequelize';

/**
 * 单张图片实体
 */
const Address = sequelize.define('addresses', {
  id                    : {type: Sequelize.BIGINT,   allowNull: false, primaryKey: true, autoIncrement: true},
  uid                   : {type: Sequelize.STRING,   allowNull: false},
  
  address               : {type: Sequelize.STRING,   allowNull: true },

  province              : {type: Sequelize.STRING,   allowNull: true },
  city                  : {type: Sequelize.STRING,   allowNull: true },

  phone                 : {type: Sequelize.STRING,   allowNull: true },
  person                : {type: Sequelize.STRING,   allowNull: true },
  status                : {type: Sequelize.INTEGER,   allowNull: false , defaultValue : 1 },
  ext                   : {type: Sequelize.TEXT,   allowNull: true },

  ctime                 : {type: Sequelize.INTEGER,   allowNull: true }

},
{
    charset: 'utf8'
});

Address.sync({force: false}).then(function(){});
export default Address;